<%--
  Created by IntelliJ IDEA.
  User: fengdefangxiang
  Date: 2022/2/9
  Time: 17:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <%@ include file="/web/header.jsp" %>
    <%--    <style>--%>
    <%--        body {--%>
    <%--            /*background: aliceblue;*/--%>
    <%--            background: url(../../../img/66ef0caebea14ed09fa90a8411ba6822.jpg) no-repeat;--%>
    <%--            background-size: cover;--%>
    <%--        }--%>
    <%--    </style>--%>
</head>
<body>
<div class="window">
    <fieldset class="layui-elem-field" style="margin: 10px">
        <legend>修改页面</legend>
        <div class="layui-field-box">
            <form class="layui-form layui-form-pane"  lay-filter="formA">
                <div class="layui-form-item">
                    <label class="layui-form-label">员工编号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="codeEmp"  readonly
                               lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">项目编号</label>
                    <div class="layui-input-inline">
                        <input type="text" name="codePro" readonly
                               lay-verify="required" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">绩效</label>
                    <div class="layui-input-inline">
                        <input type="text" name="score" id="time" placeholder="请填写绩效" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item btn">
                    <%--                <div class="layui-input-block">--%>
                    <input type="reset" class="layui-btn layui-btn-radius layui-btn-primary"/>
                    <input type="button" class="layui-btn layui-btn-radius" lay-submit lay-filter="upd" value="确定"/>
                    <input type="button" class="layui-btn layui-btn-radius " onclick="layerclose()" value="关闭"/>
                </div>
                <%--            </div>--%>
                <input type="hidden" name="action" value="upd"/>
            </form>
        </div>
    </fieldset>
</div>
<script type="text/javascript">
    var codeEmp = '<%=request.getParameter("codeEmp")%>';
    var codePro = '<%=request.getParameter("codePro")%>';


    function init() {
        ajax("/ScoreServlet", {codeEmp:codeEmp, codePro:codePro, action: 'get'}, 'json', function (data) {
            console.log(data)
            form.val('formA',data);
        })
    }
    init();
    formOnSubmit('upd', '/ScoreServlet', 'text', function (data) {
        console.log(data)
        if (data == 1) {
            layer.msg("修改成功", layerclose)
        } else {
            layer.msg("修改失败")
        }
    })
</script>
</body>
</html>
